//封装wx的请求
export default function request(url,data,method='Get'){
 return new Promise((resolve,reject)=>{
   wx.request({
     url: 'http://localhost:3000'+url,
     data,
     method,
     success:(res)=>{
      resolve(res.data)
     },
     fail:(error)=>{
      reject(error)
     }
   })
 })
}